Please note that this code only applies if you are testing start AND end dates of availability against start AND end dates of a booking, e.g. car hire or holidays

If you don't have four dates then the solution to the problem is slightly simpler but different to the one outlined here.

Say you are working out availability of cars for car hire you would need to apply the filter to the collection clsCarCollection which will give you a list of available cars for the start ad end date.